--- a/src/setup/setup.c
+++ b/src/setup/setup.c
@@ -37,6 +37,7 @@
 #include <ftw.h>
 #include <stdbool.h>
 #include <blkid.h>
+#include <sys/sysmacros.h>
 
 #include "efivars.h"
 
